package com.ng.common.servlet;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import com.ng.common.servlet.service.IDbapiServlet;

@WebServlet(name = "dbapiServlet", urlPatterns = "/api/*")
public class DbapiServlet extends HttpServlet {

	private static final long serialVersionUID = -8026978813971475915L;

	@Autowired
	private IDbapiServlet servletImpl;
	
	public DbapiServlet() {
        super(); 
    }

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		servletImpl.handleRequest(request, response);

	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		servletImpl.handleRequest(request, response);
	}

	@Override
	protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		servletImpl.handleRequest(req, resp);
	}

}